package com.yonyou.isv.demo.openapi.api.tax;

import com.yonyou.isv.demo.openapi.api.BaseOpenApi;
import com.yonyou.isv.demo.openapi.api.OpenApiURL;
import com.yonyou.isv.demo.openapi.base.module.reponse.ApiDataResponse;
import com.yonyou.isv.demo.openapi.base.module.reponse.ApiStringDataResonse;
import org.springframework.http.HttpEntity;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Description 销项开票-未开票收入管理
 * @Author jiaogjin
 * @Date 2022/4/26 15:08
 **/
@Component
public class InvoiceWillApi extends BaseOpenApi {

    public Map<String,Object> notInvoiceResult(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataResponse apiDataResponse = postForEntity(OpenApiURL.NOT_INVOICE_RESULT, httpEntity, ApiDataResponse.class);
        return getData(apiDataResponse);
    }

    public Map<String,Object> save(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataResponse apiDataResponse = postForEntity(OpenApiURL.SAVE_INVOICE, httpEntity, ApiDataResponse.class);
        return getData(apiDataResponse);
    }

    public Map<String,Object> changes(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataResponse apiDataResponse = postForEntity(OpenApiURL.NOT_INVOICE_CHANGES, httpEntity, ApiDataResponse.class);
        return getData(apiDataResponse);
    }

    public String outputHealthyTest(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.OUTPUT_HEALTHY_TEST, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public String outputQueryBillspush(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.OUTPUT_QUERY_BILLSPUSH, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }


    public String inputHealthyTest(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.INPUT_HEALTHY_TEST, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public String inputQueryBillspush(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.INPUT_QUERY_BILLSPUSH, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }
}
